﻿<%@ Page Language="C#" MasterPageFile="~/Common/Master/PopupDiv.master" AutoEventWireup="true" Inherits="WebMail_Account_Edit" Title="无标题页" Codebehind="Edit.aspx.cs" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
    <style type="text/css">
        .style1,.style3
        {
             text-align:right;
             padding-right:10px;
        }
        .style2,.style4
        {
            text-align:left;
            padding-left:10px;
        }     
        .style5
        {
        	width:150px;
         
        }
    </style>
    <script  type="text/javascript">
        function click1(chk,rad1,rad2)
        {
            if(chk.checked == false)
            {
                rad1.disabled = "disabled";
                rad2.disabled = "disabled";
                document.getElementById("smtp").style.visibility = "hidden";                
            }
            else
            {
                 rad1.disabled = "";
                 rad2.disabled = "";
                 rad1.checked = true;
            }
        }
        
        function click2(rad1,rad2)
        {
            if(rad2.checked)
            {
                document.getElementById("smtp").style.visibility = "";   
            }
            else
            {
                document.getElementById("smtp").style.visibility = "hidden";   
            }
        }
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<asp:Panel ID="pnlMain" runat="server" CssClass="pnlMain">
    <table border="0" width="100%" cellpadding="0" cellspacing="0">
        <tr>
            <td class="style1">
                <asp:Label ID="Label1" runat="server" Text="邮箱地址："></asp:Label></td>
            <td class="style2">
                <asp:TextBox ID="MailAddr" runat="server" CssClass="style5 txt"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
                    ControlToValidate="MailAddr" ErrorMessage="请输入邮箱地址" SetFocusOnError="True" 
                    Display="None"></asp:RequiredFieldValidator>
            </td>
            <td class="style3">
                <asp:Label ID="Label2" runat="server" Text="显示姓名："></asp:Label></td>
            <td class="style4">
                <asp:TextBox ID="DispName" runat="server" CssClass="txt style5"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" 
                    ControlToValidate="DispName" ErrorMessage="请输入显示姓名" SetFocusOnError="True" 
                    Display="None"></asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td class="style1">
                <asp:Label ID="Label3" runat="server" Text="POP3服务器："></asp:Label></td>
            <td class="style2">
                <asp:TextBox ID="Pop3Server" runat="server" CssClass="style5 txt"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" 
                    ControlToValidate="Pop3Server" ErrorMessage="请输入POP3服务器" 
                    SetFocusOnError="True" Display="None"></asp:RequiredFieldValidator>
            </td>
            <td class="style3">
                <asp:Label ID="Label4" runat="server" Text="POP3端口："></asp:Label></td>
            <td class="style4">
                <asp:TextBox ID="Pop3Port" runat="server" CssClass="style5 txt">110</asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" 
                    ControlToValidate="Pop3Port" ErrorMessage="请输入POP3端口" 
                    SetFocusOnError="True" Display="None"></asp:RequiredFieldValidator>
                <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" 
                    ControlToValidate="Pop3Port" ErrorMessage="请输入数字格式" SetFocusOnError="True" 
                    ValidationExpression="\d*" Display="None"></asp:RegularExpressionValidator>
            </td>
        </tr>
        <tr>
            <td class="style1">
                <asp:Label ID="Label5" runat="server" Text="POP3账号："></asp:Label></td>
            <td class="style2">
                <asp:TextBox ID="Pop3User" runat="server" CssClass="style5 txt"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" 
                    ControlToValidate="Pop3User" ErrorMessage="请输入邮箱账号" SetFocusOnError="True" 
                    Display="None"></asp:RequiredFieldValidator>
            </td>
            <td class="style3">
                <asp:Label ID="Label6" runat="server" Text="POP3密码："></asp:Label></td>
            <td class="style4">
                <asp:TextBox ID="Pop3Pwd" runat="server" CssClass="style5 txt" 
                    TextMode="Password"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server" 
                    ControlToValidate="Pop3Pwd" ErrorMessage="请输入POP3密码" 
                    SetFocusOnError="True" Display="None"></asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td class="style1">
                <asp:Label ID="Label7" runat="server" Text="SMTP服务器："></asp:Label></td>
            <td class="style2">
                <asp:TextBox ID="SmtpServer" runat="server" CssClass="style5 txt"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator7" runat="server" 
                    ControlToValidate="SmtpServer" ErrorMessage="请输入SMTP服务器" 
                    SetFocusOnError="True" Display="None"></asp:RequiredFieldValidator>
            </td>
            <td class="style3">
                <asp:Label ID="Label8" runat="server" Text="SMTP端口："></asp:Label></td>
            <td class="style4">
                <asp:TextBox ID="SmtpPort" runat="server" CssClass="style5 txt">25</asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator8" runat="server" 
                    ControlToValidate="SmtpPort" ErrorMessage="请输入SMTP端口" 
                    SetFocusOnError="True" Display="None"></asp:RequiredFieldValidator>
                <asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server" 
                    ControlToValidate="SmtpPort" ErrorMessage="请输入数字格式" SetFocusOnError="True" 
                    ValidationExpression="\d*" Display="None"></asp:RegularExpressionValidator>
            </td>
        </tr>
        <tr>
            
            <td colspan="2">
                <asp:CheckBox ID="IsDefault" runat="server" Text="默认账户" />
                &nbsp;
                <asp:CheckBox ID="SmtpAuthenicate" runat="server" Text="发送邮件要求身份验证" 
                    Checked="true" />
                &nbsp;</td>
            <td colspan="2">
                <asp:RadioButton ID="rad1" runat="server" GroupName="check" Checked="true"
                    Text="使用与POP3相同的信息" />
                <asp:RadioButton ID="rad2" GroupName="check"
                    runat="server" Text="其它验证信息" />               
            </td>
        </tr>
        <tr id="smtp" style="visibility:hidden;">
            <td class="style1">
                <asp:Label ID="Label9" runat="server" Text="SMTP账号："></asp:Label>
            </td>
            <td class="style2">
                <asp:TextBox ID="SmtpUser" runat="server" CssClass="style5 txt"></asp:TextBox>
            </td>
            <td class="style3">
                <asp:Label ID="Label10" runat="server" Text="SMTP密码："></asp:Label>
            </td>
            <td class="style4">
                <asp:TextBox ID="SmtpPwd" runat="server" CssClass="style5 txt" TextMode="Password"></asp:TextBox>
            </td>
        </tr>       
    </table> <asp:ValidationSummary ID="ValidationSummary1" runat="server" 
                    ShowMessageBox="True" ShowSummary="False" />
</asp:Panel>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder2" Runat="Server">
    <asp:Button ID="btnSave" runat="server" Text="保存" onclick="btnSave_Click" />
</asp:Content>

